﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model.Raw_Materials
{
    public class Herb : Raw
    {
        //only a limited number of herbs are "known" from the start, ie. general attributes, which are good for healing etc.
        //known herbs can be researched further to gain more insight, revealing various stats.
        //unknown herbs can be found by (rangers) and examined, and general attributes will be revealed: description.

        private Random rand;
        //regions skal være en række variabler med værdier > 0
        public enum Region //enumerate the different regions herbs can grow in
        {
            arid = 1,
            desert,
            temperate,
            wet,
            jungle,
            aquatic,
            snowy,
            darkness
        }
        //a herb has a prefered region to grow in, represented by a number.
        //The higher the number, the more dependant the herb is on growing in this particular region        
        //region preferences

        //LOCALE/REGION!!!
        private int _region_arid, _region_desert; //etc. herbs can have high numbers in more than one region
        //most fungi would require high moisture and darkness. some regions exclude others snowy <> desert

        private double _potency; //the overall potency of the herb. Can be increased by gardenes and the facility in which it grows, manour (gødning) used etc.

        //various stats decide how good an ingredient a herb is for some givne potion
        private int _catalyst; //herbs can also be used as a catalyst to boost other herbs potency
        private int _healing_power;
        //poisonous - poison can be extracted from poisonous herbs
        //resistances
        private int _fire_resistance;
        //base stat boosts
        private int _strength, _vitality, _intellect, _perception, _agility, _luck;

        private int _growth_time; //how many days before the herb can be harvested
        //seasonal herbs are boring. should be very few herbs that are seasonal
        //most herbs can be dried (their dryability? could be measured by some variabled), but some most be used fresh
        private double _drying_effect = 1; //how much potency will the herb lose from drying

        public Herb()
        {
            rand = new Random();
        }

        private String[] Suffixes = { "root", "mushroom", "bark", "vine", "bloom", "seed", "thorn", "weed", "blood",
        "grass", "lichen", "clover", "moss", "cap", "thistle", "lotus", "tears", "sansam", "moss", "bloom", "kelp",
        "cone", "crawler", "lily", "nettle" , "leaf", "flower", "petal"};

        private String[] Prefixes = { "gold", "silver", "yellow", "green", "sun", "moon", "dark", "black", "white", 
        "red", "ice", "frost", "fire", "earth", "wind", "dragon", "mandrake", "lich", "sea", "tiger", "lion" , "snake"};

        
        public void GenerateRandomHerbNames(int max)
        {                        
            Console.WriteLine("Generating {0} random herb names", max);
            for(int i = 0; i < max; i++)
            {
                Console.WriteLine("{0}", GenerateRandomHerbName());               
            }       
        }

        public String GenerateRandomHerbName()
        {                  
            return Prefixes[rand.Next(Prefixes.Count())] + Suffixes[rand.Next(Suffixes.Count())];            
        }
    }
}
